The present invention relates to a repeater provided to execute packet routing process in, for example, a computer network or LAN.
Some of repeaters generally called routers have the hop-by-hop transfer mode and the cut-through transfer mode as packet routing modes.
The hop-by-hop transfer mode is a mode to execute the packet routing process in a network layer. In this mode a destination IP address and control information are extracted from the received IP packet data, the transfer destination is determined in accordance with the extracted destination IP address and control information, and the IP packet data is transmitted in a line corresponding to the transfer destination. A series of the processes according to the hop-by-hop transfer are conventionally implemented by the software process with a processor.
On the other hand, the cut-through transfer mode is a mode to execute the packet switching process in data link layer. In accordance with a protocol of a layer upper than a transport layer used to exchange the information between adjacent repeaters, a bypass transfer path called a cut-through transfer path is established at a hardware switch, and the packet routing is executed via the cut-through transfer path. Since the cut-through transfer mode is processed by the hardware, the high-speed routing can be executed.
Incidentally, in the repeater having these transfer modes, when the data flow is input therein, it is determined which of the hop-by-hop transfer and the cut-through transfer should be executed, in accordance with the condition to determine whether or not the cut-through transfer should be executed, i.e. the cut-through trigger. As for the cut-through trigger, a specific port number included in a TCP (Transmission Control Protocol) of the first packet (hereinafter called a trigger packet) in each data flow is always used.
FIG. 1 is a circuit block diagram showing an example of configuration of a repeater using an ATM switch as a hardware switch. In this figure, a plurality of input lines IL1 to ILnxe2x88x921 and a plurality of output lines OL1 to OLnxe2x88x921 are contained in an ATM switch unit 1.
When the ATM cells constituting the first packet of the data flow which should subjected to the routing process are input to the ATM switch 1 via any one of the input lines IL1 to ILnxe2x88x921, these ATM cells are input to a packet assembly/disassembly unit (SAR: Segmentation and Reassembly Sublayer) 3 via the output line OLn and assembled as the packet in a frame memory 4.
When a processor 5 is informed of the end of assembly of the packet by the SAR 3, the processor 5 determines whether the data flow in which the packet flows should be subjected to the hop-by-hop transfer or the cut-through transfer, by referring to the port number of the TCP of the packet.
It is assumed now that, for example, the port number of the TCP would be registered in advance as the cut-through trigger. The processor 5 determines the cut-through transfer mode and sets the switching information for the cut-through transfer on the switching table 2. Therefore, after that, the ATM cells of the same data flow arriving via the input lines are subjected to the cut-through transfer via any one of the output lines OL1 to OLnxe2x88x921 by the ATM switching unit 1, in accordance with the switching information which has been set on the switching table 2.
On the other hand, if the port number of the TCP is not registered as the cut-through trigger, the processor 5 determines the hop-by-hop transfer mode and sets on the switching table 2 the switching information that allows the packet of the same data flow input in the ATM switch unit 1 to be output to the output line OLn. For this reason, after that, the ATM cells of the same data flow arriving via the input lines are input from the ATM switch unit 1 to the SAR 3 via the output line OLn and assembled as the packet on the frame memory 4.
When the assembly has been ended, SAR 3 informs the processor 5 of the fact that the hop-by-hop packet has arrived, together with the address information of the frame memory 4. When the processor 5 receives this information, the processor 5 executes the routing process in accordance with source address, destination addresses and the like that are inserted into the header information of the packet.
When the processor 5 has ended the routing process, the processor 5 informs the SAR 3 of the fact that the transmission packet exists in the frame memory 4. When the SAR 3 is informed of the fact, the SAR 3 takes out of the frame memory 4 the packet which should be transmitted, and disassembles the packet into the ATM cells, and transfers them to the ATM switch unit 1 via the input line ILn. The ATM switch unit 1 transmits the ATM cells transferred from the SAR 3, to the output line corresponding to the destination thereof, in accordance with the information which is set on the switching table 2 by the above-mentioned routing process.
Thus, every time the data flow is input via the input lines, the cut-through transfer process or the hop-by-hop transfer process is selectively executed in accordance with the TCP port number of the first packet.
The initial object to execute the cut-through transfer is not to subject the packet in the network layer to the routing process with the software process made by the processor, but to execute a high-speed packet routing process with the hardware switching process in the data link layer. Therefore, the efficiency of transfer in the repeater becomes higher as the rate of the traffic in the cut-through transfer is higher.
In the conventional repeater, however, the TCP port number is fixedly registered as the cut-through trigger and it is determined which of the cut-through transfer and the hop-by-hop transfer should be executed in accordance with this port number, as described above. For this reason, the traffic environment in which the repeater is used may cause the traffic amount of the cut-through transfer to be reduced and the traffic amount of the hop-by-hop transfer to be increased, thereby failing to enhance the efficiency of communication.
The present invention has been accomplished in consideration of the above-mentioned circumstances, and its object is to provide a repeater capable of varying the cut-through trigger in accordance with the traffic environment, thereby increasing the amount of the cut-through trigger and enhancing the efficiency of communication.
In order to achieve the above object, the present invention provides a repeater having a hop-by-hop transfer mode in which a packet routing process is executed in a network layer and a cut-through transfer mode in which a packet switching process is executed in a data link layer, for executing a packet routing process by selectively using the modes, comprising:
traffic monitoring means for detecting a traffic of the hop-by-hop transfer meeting each of a plurality of predetermined conditions that can be cut-through triggers; and condition selecting means for comparing an amount of the traffic of each of the conditions obtained by the traffic monitoring means with a predetermined threshold value, and selecting a condition under which the amount of traffic exceeds the threshold value as the cut-through trigger, wherein determination whether a received packet should be subjected to the cut-through transfer or the hop-by-hop transfer is executed in accordance with the condition selected by the condition selecting means and the routing process is executing in accordance with a result of the determination.
Particularly, the traffic monitoring means is characterized by selecting, for example, at least two of the TCP port number, the packet having a specific length, the UDP multi-cast and a specific line number at which the packet is input, as the conditions which can be the cut-through triggers, and detecting the traffics of the hop-by-hop transfer meeting the respective conditions.
Therefore, according to the present invention, the traffic amount of the hop-by-hop transfer is detected in relation to each of plural conditions that can be the cut-through triggers, such as the TCP port number, the packet having a specific length, the UDP multi-cast and a specific line number at which the packet is input, and the condition under which the detected traffic value exceeds a threshold value is selected as the cut-through trigger. That is, the condition with a higher traffic of the hop-by-hop transfer at the current time is selected and used as the cut-through trigger, in accordance with the variation in the traffic environment. For this reason, the traffic of the cut-through transfer can be always maintained to be higher, and thereby the efficiency of communication of the repeater can be enhanced.
In addition, the present invention is also characterized in that the traffic monitoring means uses a counter to count the number of transfer traffics of hop-by-hop packet meeting each of the plurality of predetermined conditions that can be the cut-through triggers, and that the condition selecting means obtains a rate of the traffic under each of the conditions to entire hop-by-hop transfer traffics in accordance with the count value of each of the conditions obtained by the counter of the traffic monitoring means, and selects a condition under which the rate exceeds the threshold value as a cut-through trigger.
Thus, by constituting the traffic monitoring means with the counter, detection of the traffic can be implemented by simple hardware and increase in dimensions of the arrangement of the repeater can be restricted as much as possible.
Further, the present invention is also characterized in that the traffic monitoring means detects the traffics, in a certain previous period, of the hop-by-hop transfer meeting each of the plurality of predetermined conditions that can be cut-through triggers.
With this structure, the variation in the current traffic can be detected further exactly by excluding any influence of the previous traffic detection value, and the rate of the cut-through transfer can be thereby highly maintained and the efficiency of communication in the repeater can be further enhanced.
Moreover, in the present invention, the traffic detection process of the traffic detecting means, and the cut-through transfer process and the hop-by-hop transfer process of the routing processing means are executed with hardware circuits, respectively, and the process of selecting the condition which can be the cut-through trigger by the condition selecting means is executed in the software process with a processor.
With this structure, the traffic detection process and the hop-by-hop transfer process can be accelerated by the hardware process, and the efficiency of communication in the repeater can be thereby further enhanced. In addition, since the load of process on the processor can be reduced, a high speed processor does not need to be provided and thereby the price of the repeater can be lowered.